home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 014a / snip23.zip / SNIPPR23.REV < prev    next >
Text File  |  1990-12-01  |  7KB  |  154 lines

  1. SNIPPR23.REV
  2.  
  3.      This Mod to SNIPPER.COM was based on work done by Tom Kihlken in the
  4. original PC Magazine Utilities Article in V6,N18, 10/27/87 and the Mod by 
  5. Jim Turner in his SNIPR22.COM in SNIPR21.ARC in Forum UTILFO Lib #2. 
  6.                                                
  7.      Copies any portion of text screen to a printer or file, or inserts it 
  8. as keyboard input into an applications program. SNIPPR23.COM [Ver 2.3] has 
  9. all the features of the original by Tom Kihlken, plus the added cursor pad 
  10. keys: Home, End, PgUp, & PgDn. These new cursor functions give quick 
  11. 1 keystroke moves to all screen/window edges for either anchoring 1st Upper 
  12. Left corner of window or 2nd Lower Right corner. With .ASM source, .COM, 
  13. & .DOC ,plus list of changes to ASM separately described in .REV file.
  14.  
  15.     The main purpose of this mod is to allow quicker moves to the screen 
  16. edges by using single keystroke moves using Home, End, PgUp, and PgDn. This
  17. relieves the need to hold down the arrows keys and wait, especially for older
  18. XT's like mine. The functions are as follows:
  19.  
  20.      HOME   Move to Left Edge of Screen/SNIPPER Window
  21.      END    Move to Right Edge of Screen
  22.      PGUP   Move to Top Edge of Screen/SNIPPER Window
  23.      PGDN   Move to Bottom Edge of Screen
  24.  
  25. Note that like the arrow keys, any of these can be used to anchor/position 
  26. both the starting upper-left corner or the finishing lower-right corner.
  27.  
  28.      The default hot key can be changed using DEBUG by substituting the 
  29. Scan code and Shift mask values listed in the article. The address of the 
  30. Scan code byte in Version 1.1 was :056B, and that of the Shift mask was :057B.
  31. The present address of the Scan code byte in Version 2.3 is :0622, and that 
  32. of the Shift mask is :0632.
  33.  
  34.      To help find the changes to the code, the revised lines have the 
  35. suffix V2.3 in Columns 75-78 in the ASM file. No lines were deleted, 
  36. although some lines were modified and new lines were added. The increased
  37. length over V1.2 is 160 bytes,(approximately 10 %) [100 bytes over V2.2], 
  38. which is not much, but if you want it leaner, the Home and PgUp functions 
  39. can be deleted by modifying the ASM source code, since the PgDn and End 
  40. functions are the ones used most.
  41.  
  42.      RENAME the COM file to SNIPPER.COM to replace older versions, or keep
  43. the name as is to maintain separate versions. 
  44.  
  45. CHANGES in .ASM SOURCE CODE
  46.      Note that only the lines changed are listed below. For a better look at 
  47. the logic, please look in the actual ASM file. Also, some lines have no 
  48. change to the actual code, the mod being only the inclusion of a label to 
  49. allow a jump to that point.
  50.  
  51. Lines 78-81 include 4 new flags (1 for each key) to record and save the 
  52.  cursor keypad presses.
  53. Lines 117,122,126 & 130 have new labels to allow jumps to them to force
  54.  movement to the appropriate screen edge prior to anchoring the first corner.
  55. Lines 155-162 perform the comparisons against the keypress to see if any of 
  56.  the new keys have been pressed prior to anchoring the first corner.
  57. Lines 178-181 clear the 4 new flags before reading the keyboard inputs to move
  58.  cursor after anchoring the first corner.
  59. Line 191-194 & 197-200 perform the comparisons against the keypress to see if 
  60.  any of the new keys have been pressed to move cursor after anchoring the 
  61.  first corner.
  62. Lines 195-196 have been moved to preserve a short jump, but are unchanged.
  63. Lines 202-204, 211-212, 229-231, 238-240 respectively set the flag for a 
  64.  given keypress and loads the 2nd corner coords into the DX register.
  65. Lines 223-227 & 250-254 modify the COL_LOOP and ROW_LOOP respectively, by 
  66.  adding compares that check whether any of the new flags are set, and, if so,
  67.  continues adding or removing columns or rows until the screen or window edges
  68.  are reached.
  69.  
  70. The new/modified lines in the ASM source code are listed below.
  71.  
  72.  Ln # Line...                                                          Version
  73. ----- ------------------------------------------------------------------- ----
  74.    78 END_FLAG    DB    0        ;"END"  Key Pressed =1          V2.3
  75.    79 PGDN_FLAG    DB    0        ;"PGDN" Key Pressed =1          V2.3
  76.    80 HOME_FLAG    DB    0        ;"HOME" Key Pressed =1          V2.3
  77.    81 PGUP_FLAG    DB    0        ;"PGUP" Key Pressed =1          V2.3
  78.  
  79.   117 FORCE_RIGHT:    MOV    DL,CRT_COLS    ;JUMP TO THE RIGHT EDGE      V2.3
  80.  
  81.   122 FORCE_LEFT:    XOR    DL,DL        ;IF YES, WRAP TO LEFT EDGE V2.3
  82.  
  83.   126 FORCE_BOTTOM:    MOV    DH,SCRN_ROWS    ;JUMP DOWN TO THE BOTTOM  V2.3
  84.  
  85.   130 FORCE_TOP:    XOR    DH,DH        ;JUMP BACK TO THE TOP      V2.3
  86.  
  87.   155         CMP     AH,47H        ;IS IT HOME KEY?          V2.3
  88.   156         JE    FORCE_LEFT    ;JUMP TO LEFT SCREEN EDGE      V2.3
  89.   157         CMP    AH,49H        ;IS IT PGUP KEY?          V2.3
  90.   158         JE    FORCE_TOP    ;JUMP TO TOP SCRREN EDGE      V2.3
  91.   159         CMP     AH,4FH        ;IS IT END KEY?              V2.3
  92.   160         JE    FORCE_RIGHT    ;JUMP TO RIGHT SCREEN EDGE      V2.3
  93.   161         CMP    AH,51H        ;IS IT PGDN KEY?          V2.3
  94.   162         JE    FORCE_BOTTOM    ;JUMP TO BOTTOM SCREEN EDGE      V2.3
  95.  
  96.   178         MOV    END_FLAG,0    ; CLEAR END FLAG          V2.3
  97.   179         MOV    PGDN_FLAG,0    ; CLEAR PGDN FLAG          V2.3
  98.   180         MOV    HOME_FLAG,0    ; CLEAR HOME FLAG          V2.3
  99.   181         MOV    PGUP_FLAG,0    ; CLEAR PGUP FLAG          V2.3
  100.  
  101.   191         CMP    AH,4FH        ;IS IT "END"?              V2.3
  102.   192         JE    GOT_END        ;GO TO RIGHT EDGE OF SCREEN      V2.3
  103.   193         CMP    AH,51H        ;IS IT "PGDN"?              V2.3
  104.   194         JE    GOT_PGDN    ;GO TO BOTTOM EDGE OF SCREEN      V2.3
  105.  
  106.   197         CMP    AH,47H        ;IS IT "HOME"?              V2.3
  107.   198         JE    GOT_HOME    ;GO TO LEFT EDGE OF WINDOW      V2.3
  108.   199         CMP    AH,49H        ;IS IT "PGUP"?              V2.3
  109.   200         JE    GOT_PGUP    ;GO TO TOP EDGE OF WINDOW      V2.3
  110.  
  111.   202 GOT_HOME:    MOV    HOME_FLAG,1    ;"HOME" KEY PRESSED          V2.3
  112.   203 SUB_COL:
  113.   204         MOV    DX,BOT_RIGHT    ;2ND CORNER COORDS          V2.3
  114.  
  115.   211 GOT_END:    MOV    END_FLAG,1    ;"END" KEY PRESSED          V2.3
  116.   212 ADD_COL:
  117.   213         MOV    DX,BOT_RIGHT    ;2ND CORNER COORDS          V2.3
  118.  
  119.   223         CMP    END_FLAG,1    ;IF "END", REPEAT TO RIGHT EDGE      V2.3
  120.   224         JE    ADD_COL        ;ADD ANOTHER COLUMN          V2.3
  121.   225         CMP    HOME_FLAG,1    ;IF "HOME", REPEAT TO LEFT EDGE      V2.3
  122.   226         JE    SUB_COL        ;REMOVE ANOTHER COLUMN          V2.3
  123.   227 GET_KB_K2_JMP:    JMP    GET_KB_KEY2    ;              V2.3
  124.  
  125.   229 GOT_PGUP:    MOV    PGUP_FLAG,1    ;"PGUP" KEY PRESSED          V2.3
  126.   230 SUB_ROW:
  127.   231         MOV    DX,BOT_RIGHT    ;2ND CORNER COORDS          V2.3
  128.  
  129.   238 GOT_PGDN:    MOV    PGDN_FLAG,1    ;"PGDN" KEY PRESSED          V2.3
  130.   239 ADD_ROW:
  131.   240         MOV    DX,BOT_RIGHT    ;2ND CORNER COORDS          V2.3
  132.  
  133.   250         CMP    PGDN_FLAG,1    ;IF "PGDN", REPEAT TO BOTTOM EDGE V2.3
  134.   251         JE    ADD_ROW        ;ADD ANOTHER ROW          V2.3
  135.   252         CMP    PGUP_FLAG,1    ;IF "PGUP", REPEAT TO TOP EDGE      V2.3
  136.   253         JE    SUB_ROW        ;REMOVE ANOTHER ROW          V2.3
  137.   254         JMP    GET_KB_KEY2    ;                  V2.3
  138.  
  139.  
  140. For more info on the earlier versions, download the following files:
  141.  
  142. Filename : SNIP12.ARC  Forum: UTILFO Lib: Utilities (PCMAG)  Lib #: 2
  143. Submitter: [75776,1011]   06-Nov-88    for info on Version 1.2
  144.  
  145. Filename : SNIP21.ARC  Forum: UTILFO  Lib: Utilities (PCMAG)  Lib #: 2
  146. Submitter: [71560,3452]   20-Nov-88    for info on Version 2.2
  147.  
  148. Please note the slight inconsistency in the filenames and version numbers,
  149.  i.e., SNIP21.ARC contains a file labeled Version 2.2. To avoid confusion, 
  150.  I have named my mod Version 2.3.
  151.  
  152.                         T. Gentile
  153.                                                                             
  154.